let path = require("path")
let webpack = require("webpack")

module.exports = {
    mode: 'production',

    entry: {
        vue: ["vue", "vue-router", "vuex"]
    },
    output: {
        filename: "_dll_[name].js",
        path: path.resolve(__dirname, "dist"),
        library: "_dll_[name]",   //命名空间
        libraryTarget: "var"   // "umd"  "commonjs"
    },
    plugins: [
        new webpack.DllPlugin({
            name: "_dll_[name]",   //要与library相同
            path: path.resolve(__dirname, "dist", "manifest.json")
        })

    ]
}